package com.hlmedicals.app.system.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

/**
 * 系统用户父类表，不能直接使用
  
          缓存，因为它的主键是三个对象共享
 * @author  张代浩
 */
@Entity
@Table(name = "his_base_user")
@Inheritance(strategy = InheritanceType.JOINED)
public class HisBaseUser implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@Column(name = "id", nullable = false, length = 32)
	private String id; //用户的主键不再自动生成
	
	@Column(name = "username", nullable = true, length = 10)
	private String userName;// 用户名
	@Column(name = "realname", length = 50)
	private String realName;// 真实姓名
	/**手机号,后期接入app 可能要使用phone登录  */
	@Column(name = "mobile_phone", nullable = true,length=11)
	private String mobilePhone; //手机号
	@Column(name = "token", nullable = true,length=255)
	private String token; //访问凭证
	@Column(name = "head_url", nullable = true,length=255)
	private String headUrl; //头像url
	@Column(name = "userkey", length = 200)
	private String userKey;//用户角色集全
	private String password;//用户密码
	private Short status;// 
	private byte[] signature;// 签名文件
	
	
	@Column(name = "deleted", columnDefinition = "tinyint(1) default 0")
	private Integer deleted=0;//删除标识
	
	
	
	public Integer getDeleted() {
		return deleted;
	}
	public void setDeleted(Integer deleted) {
		this.deleted = deleted;
	}
	

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	
	@Column(name = "signature",length=3000)
	public byte[] getSignature() {
		return signature;
	}
	public void setSignature(byte[] signature) {
		this.signature = signature;
	}
	
	/**
	 * 方法：取得 String
	 * 
	 * @return: String token
	 */

	public String getToken() {
		return token;
	}
	/**
	 * 方法：设置String
	 * 
	 * @param: String token
	 */
	public void setToken(String token) {
		this.token = token;
	}
	/**
	 * 方法：取得 String
	 * 
	 * @return: String headUrl
	 */
	
	public String getHeadUrl() {
		return headUrl;
	}
	/**
	 * 方法：设置String
	 * 
	 * @param: String headUrl
	 */
	public void setHeadUrl(String headUrl) {
		this.headUrl = headUrl;
	}

	
	public String getUserKey() {
		return userKey;
	}

	public void setUserKey(String userKey) {
		this.userKey = userKey;
	}


	public Short getStatus() {
		return this.status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}
	
	
	
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	/**
	 * 方法：取得 String
	 * 
	 * @return: String mobilePhone
	 */
	
	public String getMobilePhone() {
		return mobilePhone;
	}
	/**
	 * 方法：设置String
	 * 
	 * @param: String mobilePhone
	 */
	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	public String getRealName() {
		return this.realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}
	

   
}